import 'package:shining_red_star/model/unique.dart';

class NumberInfo implements Unique {
  @override
  final String id;
  final int value;
  final String aud;

  const NumberInfo({
    required this.id,
    required this.value,
    required this.aud,
  });

  factory NumberInfo.fromJson(Map<String, dynamic> json) {
    return NumberInfo(
      id: json['id'],
      value: json['value'],
      aud: json['aud'],
    );
  }

  static List<NumberInfo> jsonToList(List<dynamic> json) {
    return json.map((item) => NumberInfo.fromJson(item)).toList();
  }
}
